package com.cc.pokergame.model;

public class TableModel {
    private String tableName;
    private int bottomPot;
    private int liveCount;
    private int minMoney;
    private int maxMoney;

    public TableModel(String tableName, int bottomPot, int liveCount, int minMoney, int maxMoney) {
        this.tableName = tableName;
        this.bottomPot = bottomPot;
        this.liveCount = liveCount;
        this.minMoney = minMoney;
        this.maxMoney = maxMoney;
    }

    public String getTableName() {
        return tableName;
    }

    public int getBottomPot() {
        return bottomPot;
    }

    public int getLiveCount() {
        return liveCount;
    }

    public int getMinMoney() {
        return minMoney;
    }

    public int getMaxMoney() {
        return maxMoney;
    }

    public String getMoneyRangeString() {
        return parse(minMoney) + "~" + parse(maxMoney);
    }

    private String parse(int money) {
        int num = money / 10000;
        int remainder = money % 10000;
        String remainderStr = String.format("%1d", remainder);
        return num + "." + remainderStr + "万";
    }
}
